import axios from '@/libs/api.request'
export default class Bulletin {
  /**
   * 获取公告列表
   */
  static GetBulletinList = params => {
    return axios.request({
      url: '/Bulletin/GetBulletinList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  /**
   * 保存/编辑公告
   */
  static SaveBulletin = params => {
    return axios.request({
      url: '/Bulletin/SaveBulletin',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  /**
   * 更新公告状态
   */
  static UpBulletin = params => {
    return axios.request({
      url: '/Bulletin/UpBulletin',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  /**
   * 保存用户查看公告状态
   */
  static SaveBulletinDetail = params => {
    return axios.request({
      url: '/Bulletin/SaveBulletinDetail',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  /**
   * 根据id获取公告
   */
  static GetBulletin = params => {
    return axios.request({
      url: '/Bulletin/GetBulletin',
      method: 'get',
      params: params
    })
  }

  /**
   * 根据用户id获取公告是否显示
   */
  static GetUserBulletin = params => {
    return axios.request({
      url: '/Bulletin/GetUserBulletin',
      method: 'get',
      params: params
    })
  }
}